{% extends 'blog/base.html' %}

{% block title %}
文章归档
{% endblock %}

{% block content %}
<div class="container">
    <div class="row">
        <div class="col-8 mx-auto mt-3">
            {% regroup articles by create_at.year as year_list %}
            <ul>
                {% for year in year_list %}
                <li>{{ year.grouper }}年
                    {% regroup year.list by create_at.month as month_list %}
                    <ul>
                        {% for month in month_list %}
                        <li>{{ month.grouper }}月
                            <ul>
                                {% for item in month.list %}
                                <li>
                                    <a href="{{ item.get_absolute_url }}">{{ item.title }}</a>
                                </li>
                                {% endfor %}
                            </ul>
                        </li>
                        {% endfor %}
                    </ul>
                </li>
                {% endfor %}
            </ul>
        </div>
    </div>
</div>
{% endblock %}